/** \file
* Implementation of the Twitter user database class.
* This file is part of Chorus, available at
* http://code.google.com/p/chorus-twitter/ . This file and all associated files
* and derivative works are bound by the terms of the LGPL 3.0 license,
* available at http://www.gnu.org/licenses/lgpl-3.0-standalone.html .
* \par Subversion URL:
* \$URL: http://chorus-twitter.googlecode.com/svn/branches/cpp/src/twitter/UserTree.cpp $
* \version \$Rev: 153 $
* \date    \$Date: 2010-04-06 07:43:42 +0000 (Tue, 06 Apr 2010) $
*/

#include "config.h"

#include "twitter/StatusTree.hpp"
#include "twitter/UserTree.hpp"

UserTree::UserTree(CurlGlob *curlGlobInit) :
	DefaultTree(curlGlobInit)
{
	statuses = 0;
	parsingStatus = false;
}

UserTree::~UserTree()
{
}

void UserTree::setStatusTree(StatusTree *statusesInit)
{
	statuses = statusesInit;
}

void UserTree::startElement(const xmlChar *name, const xmlChar **attrs)
{
/*	if (xmlStrEqual(name, (const xmlChar*)"status"))
	{
		parsingStatus = true;
		return;
	}

	if (parsingStatus)
		statuses->startElement(name, attrs);
	else*/
		XmlTree::startElement(name, attrs);
}

void UserTree::endElement(const xmlChar *name)
{
/*	if (parsingStatus)
	{
		statuses->endElement(name);
		if (!statuses->getPendingElement())
			parsingStatus = false;
	}
	else*/
		XmlTree::endElement(name);
}

void UserTree::elementText(const xmlChar *ch, unsigned len)
{
/*	if (parsingStatus)
		statuses->elementText(ch);
	else*/
		XmlTree::elementText(ch, len);
}
